/****************************************************
          File Name:6-2.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Thu 18 Dec 2014 08:34:47 PM CST
*****************************************************/

#include<iostream>
#include<array>
#include<cctype>

using namespace std;

int main()
{
    array<int, 10> ar;
    int i= 0;
    float  average = 0;
    int res = 0;

    cout << "Enter your donation:" <<endl;

    while(i < 10 && cin >> ar[i])       // if input is number and i < 10
        i++;

    for(int j = 0; j < i; j++)
    {
        average += ar[j];
    }

    cout << "The average of all your numbers is: " << average / float(i) << endl;

    average = average / float(i);

    for(int k = 0; k < i; k++)
    {
        if(float(ar[k]) > average)
            res += 1;
    }

    cout << "and there are " << res << " numbers bigger than the average" << endl;

    return 0;
}
